Don't call g_str_has_prefix on a NULL strung. (#344897, Tommi Komulainen)
authorMatthias Clasen <matthiasc@src.gnome.org>
Mon, 19 Jun 2006 21:20:56 +0000 (21:20 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 19 Jun 2006 21:20:56 +0000 (21:20 +0000)
* gtk/gtkentrycompletion.c (gtk_entry_completion_compute_prefix): Don't
call g_str_has_prefix on a NULL strung.  (#344897, Tommi Komulainen)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkentrycompletion.c

index a06223520e093e43877193e529c479e54a9536e5..f74b7ae84c50fc76ab71d030ff8d38c0c4912f0f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-06-19  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_compute_prefix): Don't
+       call g_str_has_prefix on a NULL strung.  (#344897, Tommi Komulainen)
+
        * gtk/gtkfilechooserdefault.c: 
        Avoid a near-duplicate string and add some
        translator comments.  (#345320, #345321, Hendrik Richter)
index a06223520e093e43877193e529c479e54a9536e5..f74b7ae84c50fc76ab71d030ff8d38c0c4912f0f 100644 (file)
@@ -1,5 +1,8 @@
 2006-06-19  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkentrycompletion.c (gtk_entry_completion_compute_prefix): Don't
+       call g_str_has_prefix on a NULL strung.  (#344897, Tommi Komulainen)
+
        * gtk/gtkfilechooserdefault.c: 
        Avoid a near-duplicate string and add some
        translator comments.  (#345320, #345321, Hendrik Richter)
index 34d9bd0998a85d12bfe6cd4f624d9ba1598667e5..46bc7ffad757c0d285e82b343213473349f37589 100644 (file)
@@ -1486,7 +1486,7 @@ gtk_entry_completion_compute_prefix (GtkEntryCompletion *completion)
                          &iter, completion->priv->text_column, &text,
                          -1);
 
-      if (g_str_has_prefix (text, key))
+      if (text && g_str_has_prefix (text, key))
        {
          if (!prefix)
            prefix = g_strdup (text);